package com.utils.network.api;

/**
 * 配置请求的基本信息
 */
public class ApiConfig {
    private static ApiConfig sApiConfig;

    /*api的接口请求地址*/
    static String BASE_URL = "https://www.wanandroid.com/";
    /*api 上传图片的请求的地址*/
    private static String BASE_UPLOAD_URL = "https://www.wanandroid.com/";
    /*请求超时时间*/
    static int TIME_OUT = 60;
    /*友好提示回调*/
    private static CallFriend sCallFriend;

    public static ApiConfig getInstance() {
        if (null == sApiConfig) sApiConfig = new ApiConfig();
        return sApiConfig;
    }

    public ApiConfig setBaseUrl(String pBaseUrl) {
        BASE_URL = pBaseUrl;
        return this;
    }

    public ApiConfig setBaseUploadUrl(String pBaseUploadUrl) {
        BASE_UPLOAD_URL = pBaseUploadUrl;
        return this;
    }

    public ApiConfig setTimeOut(int pTimeOut) {
        TIME_OUT = pTimeOut;
        return this;
    }

    public static CallFriend getCallFriend() {
        return sCallFriend;
    }

    public static void setCallFriend(CallFriend pCallFriend) {
        sCallFriend = pCallFriend;
    }
}
